package cn.com.sinux.spring.timing;

import org.apache.commons.lang.StringUtils;

/**
 * Created by Administrator on 2016/10/7.
 */
public class JobConf {

    public JobConf()
    {
    }

    public JobConf(boolean concurrent, String group, String jobTag)
    {
        this.concurrent = concurrent;
        if(StringUtils.isBlank(group))
            group = "DEFAULT";
        this.group = group;
        this.jobTag = jobTag;
    }

    public boolean isConcurrent()
    {
        return concurrent;
    }

    public JobConf concurrent(boolean concurrent)
    {
        this.concurrent = concurrent;
        return this;
    }

    public String getGroup()
    {
        return group;
    }

    public JobConf group(String group)
    {
        this.group = group;
        return this;
    }

    public String getJobTag()
    {
        return jobTag;
    }

    public JobConf jobTag(String jobTag)
    {
        this.jobTag = jobTag;
        return this;
    }

    private String jobTag;
    private String group;
    private boolean concurrent;
}
